<?php
namespace Backend\Controller;
use Think\Controller;
class ReportController extends BaseController
{

    public  function  adPosition(){
        $code =D('Code')->field('id,code_name')->order('id desc')->where(array('user_id' =>$_SESSION['id']))->select();
        $this->assign('code',$code);

        $data['end'] =date("Y-m-d",strtotime("-1 day"));
        $data['begin']=date("Y-m-d",strtotime("-1 week"));
        $this->assign('data',$data);

        $this->display();
    }
    public  function  game(){
        $ad_delivery =D('Ad_delivery')->field('id,ad_name as delivery_name')->order('id desc')->where(array('user_id' =>$_SESSION['id']))->select();
        $this->assign('delivery',$ad_delivery);

        $data['end'] =date("Y-m-d",strtotime("-1 day"));
        $data['begin']=date("Y-m-d",strtotime("-1 week"));
        $this->assign('data',$data);

        $this->display();
    }

    public  function  delivery(){
        $ad_delivery =D('Ad_delivery')->field('id,ad_name as delivery_name')->where(array('user_id' =>$_SESSION['id']))->order('id desc')->select();
        $this->assign('delivery',$ad_delivery);

        $data['end'] =date("Y-m-d",strtotime("-1 day"));
        $data['begin']=date("Y-m-d",strtotime("-1 week"));
        $this->assign('data',$data);
        $this->display();
    }

    public function total(){
        $data['end'] =date("Y-m-d",strtotime("-1 day"));
        $data['begin']=date("Y-m-d",strtotime("-1 week"));
        $this->assign('data',$data);
        $this->display();
    }

}